<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true"
    tools:context=".ui.fragments.DiaryFragment">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/dateCard"
        style="?attr/materialCardViewElevatedStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Material3.Corner.Bottom">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="@dimen/day_title_margin">

            <TextView
                android:id="@+id/textView2"
                style="@style/TextAppearance.Material3.LabelLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/days"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/daySliderContainer" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/daySliderContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/weekSliderContainer">

                <com.google.android.material.slider.Slider
                    android:id="@+id/daySlider"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/day_slider"
                    android:stepSize="1"
                    android:value="3"
                    android:valueFrom="0"
                    android:valueTo="6"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.5"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.5"
                    app:tickVisible="true" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <TextView
                android:id="@+id/weeksTitle"
                style="@style/TextAppearance.Material3.LabelLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/weeks"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/weekSliderContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/weeksTitle">

                <Button
                    android:id="@+id/add_week_before"
                    style="?attr/materialIconButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/add_week_before"
                    android:tooltipText="@string/add_week_before"
                    app:icon="@drawable/ic_round_keyboard_arrow_left_24"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.5" />

                <com.google.android.material.slider.Slider
                    android:id="@+id/weekSlider"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/week_slider"
                    android:stepSize="1"
                    android:value="1"
                    android:valueFrom="0"
                    android:valueTo="2"
                    app:labelBehavior="floating"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/add_week_after"
                    app:layout_constraintStart_toEndOf="@+id/add_week_before"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.5"
                    app:tickVisible="true" />

                <Button
                    android:id="@+id/add_week_after"
                    style="?attr/materialIconButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/add_week_after"
                    android:tooltipText="@string/add_week_after"
                    app:icon="@drawable/ic_round_keyboard_arrow_right_24"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.5" />
            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/dayViewPager"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_below="@id/dateCard"
        android:layout_alignParentBottom="true">

    </androidx.viewpager2.widget.ViewPager2>

</RelativeLayout>